package com.lening.iot.service.impl;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.lening.common.base.BaseServiceImpl;
import com.lening.iot.dao.AccontrolDAO;
import com.lening.iot.dto.AccontrolDTO;
import com.lening.iot.po.AccontrolPO;
import com.lening.iot.service.IAccontrolService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @ToDo:
 * @Author：李忠达
 * @date: 2024/6/4 10:05
 */
@Service
public class AccontrolServiceImpl extends BaseServiceImpl<AccontrolDAO, AccontrolPO, AccontrolDTO> implements IAccontrolService {

    @Autowired(required = false)
    private AccontrolDAO accontrolDAO;



    @Override
    public Page<AccontrolDTO> getAllAcl(Page<AccontrolDTO> accontrolDTO) {

        Page<AccontrolDTO> accPage = accontrolDAO.getAllAcl(accontrolDTO);
        return accPage;
    }

    @Override
    public List<AccontrolDTO> getAll(String communityName) {
        List<AccontrolDTO> accontrolList = accontrolDAO.getAll(communityName);
        return accontrolList;
    }

//    @Override
//    public Page<?> page(AccontrolDTO accontrolDTO) {
//        return accontrolDAO.getAllAcl(accontrolDAO);
//    }


    @Override
    public Page<?> page(AccontrolDTO accontrolDTO) {
        return accontrolDAO.getAllAcl(accontrolDTO);
    }

    @Override
    public AccontrolPO getById(Long id) {
        return this.accontrolDAO.getId(id);
    }


}
